

export class Person {
    constructor(name, age) {
        this.name = name;
        this.age = age;
    }
    getinformaction() {
        alert(this.name + this.age);
    }
}

//子类1
export class Student extends Person {
    constructor(name, age, hobby) {
        super(name, age)
        this.bobby = hobby
    }
    introduce() {
        console.log(`我是${this.name},我的年龄是${this.age},我的爱好是${this.bobby}`);
    }

}


// export default {
//     Person,
//     Student
// }